const mysql = require("mysql2/promise")

async function main() {
    const connection = await mysql.createConnection({
        host: 'localhost',
        user: 'root',
        password: "123456",
        database: "companydb"
    })

    const [rows, fields] = await connection.execute('SELECT * FROM company',);
    console.log(rows)
}
main()